package com.ljf.daily.costmanagement.dto.command;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.ljf.common.validation.AddGroup;
import com.ljf.common.validation.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 费用管理--新增修改  daily_dat_cost_management
 *
 * @author LJF
 * @since 2025-03-30
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("费用管理--新增修改")
public class DailyDatCostManagementCommand implements Serializable {

    @JsonProperty("id")
    @ApiModelProperty(value = "ID")
    @NotNull(message = "ID不能为空", groups = UpdateGroup.class)
    private Long id;

    @JsonProperty("name")
    @ApiModelProperty(value = "名称")
    @Length(message = "名称不能超过20个字符", max = 20)
    @NotEmpty(message = "名称不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String name;

    @JsonProperty("calculateUnit")
    @ApiModelProperty(value = "计量单位")
    @Length(message = "计量单位不能超过5个字符", max = 5)
    @NotEmpty(message = "计量单位不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String calculateUnit;

    @JsonProperty("symbolCode")
    @ApiModelProperty(value = "标签编码")
    @Length(message = "标签编码不能超过10个字符", max = 10)
    private String symbolCode;

    @JsonProperty("activitySign")
    @ApiModelProperty(value = "活动标志")
    @NotNull(message = "活动标志不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private Integer activitySign;

}
